# -*- coding: UTF-8 -*- #
"""
-------真正的勇士， 敢于直面惨淡的Warning、 敢于正视淋漓的Error-----
@author : 贾鹏博
@file : cart.py
@time : 2022/6/29 21:39
"""
from apitest.电子商城接口框架.apis.base_api import BaseApi


class Cart(BaseApi):

    def add(self, goodsId, productId):
        url = "wx/cart/add"
        add_data = {"goodsId": goodsId, "number": 1, "productId": productId}
        r = self.send("post", url, json=add_data)
        return r

    def client_delete(self, productId):
        client_url = "wx/cart/delete"
        client_r = self.send("post", client_url, json={"productIds": productId})
        return client_r
